home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Views / View Options / ConformsToPaneSize.cp next >
Text File  |  2000-06-23  |  735b  |  39 lines

  1. // ConformsToPaneSize.cp
  2.  
  3. #ifndef ConformsToPaneSize_h
  4. #include "ConformsToPaneSize.h"
  5. #endif
  6. #ifndef AcceptsConformanceToSize_h
  7. #include "AcceptsConformanceToSize.h"
  8. #endif
  9. #ifndef Assert_h
  10. #include "Assert.h"
  11. #endif
  12. #ifndef DrawsSpontaneously_h
  13. #include "DrawsSpontaneously.h"
  14. #endif
  15.  
  16. ConformsToPaneSize::ConformsToPaneSize()
  17.   : conformTo( 0 ),
  18.      paneSize( 0, 0 ),
  19.      paneSizeKnown( false )
  20.   {
  21.   }
  22.  
  23. ConformsToPaneSize::~ConformsToPaneSize()
  24.   {
  25.     if ( conformTo != 0 )
  26.       {
  27.         Assert( conformTo->conformingView == this );
  28.         Assert( conformTo->paneSize == paneSize );
  29.         Assert( conformTo->paneSizeKnown == paneSizeKnown );
  30.         
  31.         conformTo->conformingView = 0;
  32.       }
  33.   }
  34.  
  35. void ConformsToPaneSize::PaneSizeChanged()
  36.   {
  37.     Invalidate();
  38.   }
  39.